﻿using DAL;
using Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
   public  class ProductBLL
    {
        private ProductDAL dal;
        public ProductBLL()
        {
            dal = new ProductDAL();
        }
        public DataSet CategoryList()
        {
            return dal.CategoryList();
        }
        /// <summary>
        /// 数据新增方法实现
        /// </summary>
        /// <param name="bo"></param>
        /// <returns></returns>
        public bool Insert(Product bo)
        {
            return dal.Insert(bo);
        }
        public bool Update(Product bo)
        {
            return dal.Update(bo);
        }
        public bool Delete(Product bo)
        {
            return dal.Delete(bo);
        }
        public Product FindByID(string id)
        {
            return dal.FindByID(id);
        }
        public List<Product> GetList()
        {
            return dal.GetList();
        }
        public Category FindCategoryIDByCategoryName(string name)
        {
            return dal.FindCategoryIDByCategoryName(name);
        }
    }
}
